
package de.szut.ita13sommerfeld.apacheanalyser.main;

import java.io.File;
import java.io.IOException;

import de.szut.ita13sommerfeld.apacheanalyser.apachelog.ApacheLog;
import de.szut.ita13sommerfeld.apacheanalyser.commander.ApacheCommander;
import de.szut.ita13sommerfeld.apacheanalyser.commander.ApacheCommanderInterpreter;
import de.szut.ita13sommerfeld.apacheanalyser.components.ApacheComponent;
import de.szut.ita13sommerfeld.apacheanalyser.handler.ApacheHandler;
import de.szut.ita13sommerfeld.apacheanalyser.reader.ApacheReader;
import de.szut.ita13sommerfeld.apacheanalyser.statistics.ApacheStatistics;


/**
 * @author Rene Sommerfeld
 *
 */
public class Main {

	public static void main(String[] args) throws IOException {	
		ApacheCommander apachecommander = new ApacheCommander(args);
		ApacheReader apachereader = new ApacheReader(new File("apache.log"));
		ApacheLog log = new ApacheLog(apachereader);
		ApacheHandler apachehandler = new ApacheHandler(log);
		ApacheStatistics apachestatistics = new ApacheStatistics(log, new File("statistics.properties"));
		ApacheComponent[] components = {apachehandler, apachecommander, apachestatistics};
		ApacheCommanderInterpreter interpreter = new ApacheCommanderInterpreter(components);

		interpreter.initialize();

	}
	
	
}
